package org.jasper.api.service;

import org.jasper.api.container.KieContainer;
import org.jasper.api.repository.KieRepository;

/**
 * Created by OP038074 on 2018/7/3.
 */
public interface KieServices {

    KieRepository getRepository();
    KieContainer getKieClasspathContainer();

    class Factory {
        private static KieServices INSTANCE;

        static {
            try {
                INSTANCE = (KieServices) Class.forName("org.jasper.impl.service.KieServicesImpl").newInstance();
            } catch (Exception e) {
                throw new RuntimeException("Unable to instance KieServices", e);
            }
        }

        public static KieServices get() {
            return INSTANCE;
        }

    }
}
